package com.thread;

import java.util.concurrent.TimeUnit;

public class ThreadOperation {
	static boolean mStop;
	static int count = 0;
	static long t1, t2, t3;

	public static void main(final String[] args) throws InterruptedException {
		Thread thread = new Thread(new Runnable() {
			public void run() {
				while (mStop) {
					t3 = System.currentTimeMillis();
					count++;
					System.out.println("count=="+count);
					if(count==100){
						mStop=false;
						System.out.println(args.length);
					}
				}
			}
		});	
		mStop = true;
		thread.start();
		t1 = System.currentTimeMillis();
		System.out.println();
//		TimeUnit.SECONDS.sleep(2000);
		t2 = System.currentTimeMillis();
		System.out.println("count=="+count);
	}

}
